The US 2007/03006 A1 discloses an X-ray detector for a Spectral CT (Computed Tomography) scanner in which incident X-ray photons are counted and classified with respect to their energy. The detector comprises a material that absorbs incident X-ray photons and electrodes for the detection of the resulting electrical signals. To cope with high count rates, an array of single anodes is provided to reduce the effective size of the pixels. A problem of this detector is however that its function may become sub-optimal if the operation parameters of the imaging system change.